package com.umeng.analytics.pro;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

public class q {
    public static final int a = 1;
    private static final int b = 1000;
    private static final int c = 1001;
    private static final int d = 1002;

    public q() {

    }

    public static String a(long arg6) {
        Calendar v0 = Calendar.getInstance();
        v0.setTimeInMillis(arg6);
        return String.valueOf((((long)(v0.get(12) / 6 + 1 + v0.get(11) * 10 - 1))) + q.b(arg6) * 240);
    }

    public static boolean a(long arg2, long arg4) {
        boolean v0 = q.e(arg2) == q.e(arg4) ? true : false;
        return v0;
    }

    private static long a(long arg6, int arg8) {
        int v5 = 12;
        Calendar v1 = Calendar.getInstance();
        v1.setTimeInMillis(arg6);
        int v2 = v1.get(v5) / 6 + 1 + v1.get(11) * 10;
        int v3 = v1.get(13);
        int v0 = 0;
        if(arg8 == 1002) {
            v0 = 360 - (v1.get(v5) % 6 * 60 + v3);
        }
        else if(arg8 == 1001) {
            v0 = 60 - v3 % 60;
            if(v2 % 6 == 0) {
                v0 += 60;
            }
        }

        return ((long)(v0 * 1000));
    }

    public static long b(long arg8) {
        long v4;
        long v0 = 0;
        try {
            long v2_1 = new SimpleDateFormat("yyyy", Locale.getDefault()).parse("1970").getTime();
            v4 = (arg8 - v2_1) / 86400000;
            if((arg8 - v2_1) % 86400000 <= v0) {
                return v4;
            }
        }
        catch(Throwable v2) {
            return v0;
        }

        v0 = 1;
        return v4;
    }

    public static long c(long arg2) {
        return q.a(arg2, 1001);
    }

    public static long d(long arg2) {
        return q.a(arg2, 1002);
    }

    private static int e(long arg2) {
        Calendar v0 = Calendar.getInstance();
        v0.setTimeInMillis(arg2);
        return v0.get(5);
    }
}

